Optimal. Leaf size=205 \[ -\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )+\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )+\frac {\log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 205, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 7, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.467, Rules used = {714, 1141,
1175, 632, 210, 1178, 642} \begin {gather*} -\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \text {ArcTan}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 \sqrt {x+1}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )+\sqrt {\frac {1}{2} \left (1+\sqrt {2}\right )} \text {ArcTan}\left (\frac {2 \sqrt {x+1}+\sqrt {2 \left (1+\sqrt {2}\right )}}{\sqrt {2 \left (\sqrt {2}-1\right )}}\right )+\frac {\log \left (x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\log \left (x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {x+1}+\sqrt {2}+1\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 210
Rule 632
Rule 642
Rule 714
Rule 1141
Rule 1175
Rule 1178
Rubi steps
\begin {align*} \int \frac {\sqrt {1+x}}{1+x^2} \, dx &=2 \text {Subst}\left (\int \frac {x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+x}\right )\\ &=-\text {Subst}\left (\int \frac {\sqrt {2}-x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+x}\right )+\text {Subst}\left (\int \frac {\sqrt {2}+x^2}{2-2 x^2+x^4} \, dx,x,\sqrt {1+x}\right )\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )+\frac {1}{2} \text {Subst}\left (\int \frac {1}{\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x+x^2} \, dx,x,\sqrt {1+x}\right )+\frac {\text {Subst}\left (\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 x}{-\sqrt {2}-\sqrt {2 \left (1+\sqrt {2}\right )} x-x^2} \, dx,x,\sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}+\frac {\text {Subst}\left (\int \frac {\sqrt {2 \left (1+\sqrt {2}\right )}-2 x}{-\sqrt {2}+\sqrt {2 \left (1+\sqrt {2}\right )} x-x^2} \, dx,x,\sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}\\ &=\frac {\log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,-\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}\right )-\text {Subst}\left (\int \frac {1}{2 \left (1-\sqrt {2}\right )-x^2} \, dx,x,\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}\right )\\ &=\frac {\tan ^{-1}\left (\frac {-\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (-1+\sqrt {2}\right )}}+\frac {\tan ^{-1}\left (\frac {\sqrt {2 \left (1+\sqrt {2}\right )}+2 \sqrt {1+x}}{\sqrt {2 \left (-1+\sqrt {2}\right )}}\right )}{\sqrt {2 \left (-1+\sqrt {2}\right )}}+\frac {\log \left (1+\sqrt {2}+x-\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}-\frac {\log \left (1+\sqrt {2}+x+\sqrt {2 \left (1+\sqrt {2}\right )} \sqrt {1+x}\right )}{2 \sqrt {2 \left (1+\sqrt {2}\right )}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.09, size = 57, normalized size = 0.28 \begin {gather*} \sqrt {1-i} \tan ^{-1}\left (\sqrt {-\frac {1}{2}-\frac {i}{2}} \sqrt {1+x}\right )+\sqrt {1+i} \tan ^{-1}\left (\sqrt {-\frac {1}{2}+\frac {i}{2}} \sqrt {1+x}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 1.00, size = 182, normalized size = 0.89
method | result | size |
derivativedivides | \(\frac {\sqrt {2+2 \sqrt {2}}\, \left (\sqrt {2}-1\right ) \left (\frac {\ln \left (1+x +\sqrt {2}-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}\right )}{2}+\frac {\sqrt {2+2 \sqrt {2}}\, \arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}-\frac {\sqrt {2+2 \sqrt {2}}\, \left (\sqrt {2}-1\right ) \left (\frac {\ln \left (1+x +\sqrt {2}+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}\right )}{2}-\frac {\sqrt {2+2 \sqrt {2}}\, \arctan \left (\frac {2 \sqrt {x +1}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}\) | \(182\) |
default | \(\frac {\sqrt {2+2 \sqrt {2}}\, \left (\sqrt {2}-1\right ) \left (\frac {\ln \left (1+x +\sqrt {2}-\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}\right )}{2}+\frac {\sqrt {2+2 \sqrt {2}}\, \arctan \left (\frac {2 \sqrt {x +1}-\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}-\frac {\sqrt {2+2 \sqrt {2}}\, \left (\sqrt {2}-1\right ) \left (\frac {\ln \left (1+x +\sqrt {2}+\sqrt {x +1}\, \sqrt {2+2 \sqrt {2}}\right )}{2}-\frac {\sqrt {2+2 \sqrt {2}}\, \arctan \left (\frac {2 \sqrt {x +1}+\sqrt {2+2 \sqrt {2}}}{\sqrt {-2+2 \sqrt {2}}}\right )}{\sqrt {-2+2 \sqrt {2}}}\right )}{2}\) | \(182\) |
trager | \(\frac {\RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right ) \ln \left (-\frac {24 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{4} x \RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right )-2 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2} \RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right ) x +24 \sqrt {x +1}\, \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}-30 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2} \RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right )-\RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right ) x +14 \sqrt {x +1}-5 \RootOf \left (\textit {\_Z}^{2}+4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}+2\right )}{4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2} x +x +1}\right )}{2}+\RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right ) \ln \left (\frac {-24 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{5} x -26 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{3} x +12 \sqrt {x +1}\, \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2}-30 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{3}-6 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right ) x -\sqrt {x +1}-10 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )}{4 \RootOf \left (8 \textit {\_Z}^{4}+4 \textit {\_Z}^{2}+1\right )^{2} x +x -1}\right )\) | \(409\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.63, size = 260, normalized size = 1.27 \begin {gather*} \frac {1}{8} \cdot 2^{\frac {1}{4}} \sqrt {2 \, \sqrt {2} + 4} {\left (\sqrt {2} - 2\right )} \log \left (\frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + x + \sqrt {2} + 1\right ) - \frac {1}{8} \cdot 2^{\frac {1}{4}} \sqrt {2 \, \sqrt {2} + 4} {\left (\sqrt {2} - 2\right )} \log \left (-\frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + x + \sqrt {2} + 1\right ) - \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {2 \, \sqrt {2} + 4} \arctan \left (-\frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + \frac {1}{2} \cdot 2^{\frac {1}{4}} \sqrt {2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + 2 \, x + 2 \, \sqrt {2} + 2} \sqrt {2 \, \sqrt {2} + 4} - \sqrt {2} - 1\right ) - \frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {2 \, \sqrt {2} + 4} \arctan \left (-\frac {1}{2} \cdot 2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + \frac {1}{2} \cdot 2^{\frac {1}{4}} \sqrt {-2^{\frac {3}{4}} \sqrt {x + 1} \sqrt {2 \, \sqrt {2} + 4} + 2 \, x + 2 \, \sqrt {2} + 2} \sqrt {2 \, \sqrt {2} + 4} + \sqrt {2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 1.69, size = 31, normalized size = 0.15 \begin {gather*} 2 \operatorname {RootSum} {\left (128 t^{4} + 16 t^{2} + 1, \left ( t \mapsto t \log {\left (64 t^{3} + 4 t + \sqrt {x + 1} \right )} \right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 2.51, size = 160, normalized size = 0.78 \begin {gather*} \frac {1}{2} \, \sqrt {2 \, \sqrt {2} + 2} \arctan \left (\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} + 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) + \frac {1}{2} \, \sqrt {2 \, \sqrt {2} + 2} \arctan \left (-\frac {2^{\frac {3}{4}} {\left (2^{\frac {1}{4}} \sqrt {\sqrt {2} + 2} - 2 \, \sqrt {x + 1}\right )}}{2 \, \sqrt {-\sqrt {2} + 2}}\right ) - \frac {1}{4} \, \sqrt {2 \, \sqrt {2} - 2} \log \left (2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) + \frac {1}{4} \, \sqrt {2 \, \sqrt {2} - 2} \log \left (-2^{\frac {1}{4}} \sqrt {x + 1} \sqrt {\sqrt {2} + 2} + x + \sqrt {2} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.12, size = 109, normalized size = 0.53 \begin {gather*} \mathrm {atanh}\left (4\,{\left (\sqrt {-\frac {\sqrt {2}}{8}-\frac {1}{8}}+\sqrt {\frac {\sqrt {2}}{8}-\frac {1}{8}}\right )}^3\,\sqrt {x+1}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{8}-\frac {1}{8}}+2\,\sqrt {\frac {\sqrt {2}}{8}-\frac {1}{8}}\right )+\mathrm {atanh}\left (4\,{\left (\sqrt {-\frac {\sqrt {2}}{8}-\frac {1}{8}}-\sqrt {\frac {\sqrt {2}}{8}-\frac {1}{8}}\right )}^3\,\sqrt {x+1}\right )\,\left (2\,\sqrt {-\frac {\sqrt {2}}{8}-\frac {1}{8}}-2\,\sqrt {\frac {\sqrt {2}}{8}-\frac {1}{8}}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________